﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Wap/Shop/ShopSite.Master" AutoEventWireup="true" CodeBehind="DefaultActive.aspx.cs" Inherits="ZLCMS.Web.Wap.Shop.DefaultActive" %>
<%@ Register src="Footer.ascx" tagname="Footer" tagprefix="uc1" %>
<%@ Register src="UC_ShopNavBar.ascx" tagname="UC_ShopNavBar" tagprefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>V.生活商城，正品保证，全省包邮</title>
    <link href="/wap/lib/bxslider/jquery.bxslider.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/wap/lib/bxslider/jquery.bxslider.js"></script>
    <script type="text/javascript" src="/wap/lib/iscroll-5/iscroll.js"></script>
    
    <style type="text/css">
        *{ text-shadow:none; box-sizing: initial;}
        .bx-wrapper .bx-viewport { left: 0 !important;}
        .bx-viewport { border: none !important; height: auto; }
        .bx-wrapper img { width: 100%;}
        .countDown li span{background-color: #ff5d72}
        .countDown li span::before {content: none;}
        .bx-wrapper {margin:0 auto;}        
        .storedefault .actboxContainer .actbox {float: left; padding: 0.5%; width: 49%;}
        .storedefault .classify ul li{width: 20%; margin-top: 10px;}
        .storedefault .classify ul li div img{width: 60%;}
        
        .xiaovstyle3 ul li p.xvdesc{color:#f9384d;}
        .xiaovstyle3 ul li p.xvtitle{margin-bottom: 0;}
        
	#nav li{ border-left:1px solid #ddd;box-sizing: border-box;  -webkit-box-sizing: border-box; -moz-box-sizing: border-box; border-bottom:1px solid #ddd;}
	#nav li:nth-child(1){ border-left:none;}
	#navFixed .ui-navbar ul li a{ line-height: 24px;}
	#navFixed .ui-navbar ul li a.ui-btn-active{ color:#f9384d; border-bottom-color:#f9384d;}
	
	#wrapper ul+div { display: none; }

        div,img,a{margin: 0;padding: 0}
        .mian .section img,.mian  .sales img{width: 100%}
        .mian  .section,.mian  .sales { width: 98%;  margin: 2% auto; position: relative;}
        .mian  .section a{ position: absolute; width: 33%;height: 33%;}
        .mian  .section .top_left{top: 0;left: 0;}
        .mian  .section .top_center{top: 0;left: 33%;}
        .mian  .section .top_right{top: 0;left: 66%;}
        .mian  .section .center_left{top: 33%;left:0;}
        .mian  .section .center_center{top: 33%;left:33%;}
        .mian  .section .center_right{top: 33%;left:66%;}
        .mian  .section .bottom_left{top: 66%;left:0;}
        .mian  .section .bottom_center{top: 66%;left:33%;}
        .mian  .section .bottom_right{top: 66%;left:66%;}
        .mian .promotion{text-align: center;margin: 5px 0px;}
        .mian .promotion a img{width: 100%;margin-top:5px;}
        .storedefault .classify{border:none;margin: 3px 0;}
           /*背景颜色--这里改*/
          body,#mypage,.storedefault .classify{background: #FFEFDF; }    
          .hotproductlist img{width:100%}        
    </style>
    <script src="/wap/lib/jquery-countdown/dist/jquery.countdown.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">
    <!--S page -->
    <div data-role="page" id="mypage">
	    <!--S header -->
	    <div data-role="header" data-position="fixed" data-tap-toggle="false">
<%--	        <uc2:UC_ShopNavBar ID="UC_ShopNavBar1" runat="server" />--%>
	    </div>
        <!--E header -->
	    <!--S content -->
	    <div role="main" class="ui-content storedefault">
        
            <div id="banner" style=" box-sizing:initial">
                <ul class="bxslider">
                    <li><a href="/Wap/Shop/ProductDetail.aspx?no=092303122101" data-ajax="false"><img src="http://gdtvimg.weixinmvp.com/Upload/Home/banner_160924.jpg" /></a></li>
                    <li><a href="/Wap/Shop/ProductDetail.aspx?no=091803120501" data-ajax="false"><img src="http://gdtvimg.weixinmvp.com/Upload/Home/banner_160923.jpg" /></a></li>
                    <li><a href="/wap/shop/DocView.aspx?uid=271" data-ajax="false"><img src="http://gdtvimg.weixinmvp.com/Upload/Home/banner_160925.jpg" /></a></li>
                    <li><a href="/Wap/Shop/ProductDetail.aspx?no=081203123001" data-ajax="false"><img src="http://gdtvimg.weixinmvp.com/Upload/Home/banner_160927.jpg" /></a></li>
                    <li><a href="/Wap/Shop/ProductDetail.aspx?no=082303120901" data-ajax="false"><img src="http://gdtvimg.weixinmvp.com/Upload/Home/banner_16092402.jpg" /></a></li>
                    <%--<li><a href="/Wap/Shop/TMKDefault.aspx" data-ajax="false"><img src="http://gdtvimg.weixinmvp.com/Upload/Home/banner_mk.jpg" /></a></li>--%>
                  </ul>
            </div>

               <div class="mian">
                  <!--11促销大图-->
                         <div class="sales">
                                 <a  data-ajax="false" ><img src="newimages/double11/double_01.png" /></a>                
                        </div>

                  <div class="section">
                    <img src="newimages/oneimages/one_01.png" />
                    <a data-ajax="false" class="top_left" href="/Wap/Shop/ProductDetail.aspx?no=081303121001"></a>
                    <a data-ajax="false" class="top_center " href="/Wap/Shop/ProductDetail.aspx?no=081503127101"></a>
                      <a data-ajax="false" class="top_right " href="/Wap/Shop/ProductDetail.aspx?no=081503127101"></a>
                    <a data-ajax="false" class="center_left " href="/Wap/Shop/ProductDetail.aspx?no=081203127601"></a>
                      <a data-ajax="false" class="center_center " href="/Wap/Shop/ProductDetail.aspx?no=081203124201"></a>
                    <a data-ajax="false" class="center_right " href="/Wap/Shop/ProductDetail.aspx?no=081203124201"></a>
                    <a data-ajax="false" class="bottom_left" href="/Wap/Shop/ProductDetail.aspx?no=080503120901"></a>
                    <a data-ajax="false" class="bottom_center" href="/Wap/Shop/ProductDetail.aspx?no=081503128701"></a>
                      <a data-ajax="false" class="bottom_right" href="/Wap/Shop/ProductDetail.aspx?no=081503128701"></a>
                </div>
                      <!--大促-->
                      <div class="promotion">
                          <a href="" data-ajax="false">
                            <img src="newimages/oneimages/01_10.png" />
                          </a>
                          <a href="" data-ajax="false">
                               <img src="newimages/oneimages/01_11.png" />
                          </a>
                          <a href="" data-ajax="false">
                               <img src="newimages/oneimages/01_12.png" />
                          </a>
                          <a href="" data-ajax="false">
                              <img src="newimages/oneimages/01_13.png" />
                          </a>
                          <a href="" data-ajax="false">
                               <img src="newimages/oneimages/01_14.png" />
                          </a>
                          <a href="" data-ajax="false">
                              <img src="newimages/oneimages/01_15.png" />
                          </a>
                      </div>
                 </div>
    

            <div class="classify">
                <ul>
                    <li>
                   <%-- <img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_01.jpg" />--%>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=154" data-ajax="false"><div><img src="newimages/titleimages/title_01.png" /></div></a>
                        <p>时令果蔬</p>
                    </li>
                    <li>
                   <%-- <img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_04.jpg" />--%>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=155&sellcount=desc" data-ajax="false"><div><img src="newimages/titleimages/title_02.png" /></div></a>
                        <p>海产生鲜</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=165&navbar=1" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_05.jpg" />--%><img src="newimages/titleimages/title_03.png" /></div></a>
                        <p>优选干货</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=151&sellcount=desc&navbar=1" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_02.jpg" />--%><img src="newimages/titleimages/title_04.png" /></div></a>
                        <p>茗茶酒水</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=153&navbar=1" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_06.jpg" />--%><img src="newimages/titleimages/title_05.png" /></div></a>
                        <p>家电厨卫</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=166&navbar=1" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_08.jpg" />--%><img src="newimages/titleimages/title_06.png" /></div></a>
                        <p>家居家纺</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=156&sellcount=desc" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_03.jpg" />--%><img src="newimages/titleimages/title_07.png" /></div></a>
                        <p>零食小吃</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=161&navbar=1" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_09.jpg" />--%><img src="newimages/titleimages/title_08.png" /></div></a>
                        <p>粮油米面</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=167&navbar=1" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_07.jpg" />--%><img src="newimages/titleimages/title_09.png" /></div></a>
                        <p>美妆护肤</p>
                    </li>
                    <li>
                        <a href="/Wap/Shop/productlist.aspx?categoryid=152" data-ajax="false"><div><%--<img src="http://gdtvimg.weixinmvp.com/upload/icon/icon160724/icon_10.jpg" />--%><img src="newimages/titleimages/title_10.png" /></div></a>
                        <p>保健滋补</p>
                    </li>
                </ul>
            </div>
             

                     <div class="dayhot">
                <h5><span style="color:#f9384d; font-size:16px">小V</span>热卖</h5>
<%--                <div style="text-align: center; margin: 5px 0px;"><img src="http://gdtvimg.weixinmvp.com/Upload/kits/xv_02.png" style="height: 34px;" /></div>--%>
                <ul class="hotproductlist">
                </ul>
                <div style="display:none">
                    <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
                </div>
            </div>
 	    </div>
        <!--E content -->
	      
        <!--S footer -->
	    <div data-role="footer" data-position="fixed" data-tap-toggle="false">
         <uc1:Footer ID="Footer1" runat="server" MenuId="D" />  
        </div>
        <!--E footer -->
    </div>
    <!--E page -->
    
<%--    <script src="js/clamp.min.js"></script>--%>
    <script type="text/javascript">
        $(function () {
            $('.bxslider').bxSlider({
                auto: true,
                controls: false
            });

            //导航更多
            function showlist() {
                $('.ui-content').css('min-height', $(window).height());
                $('.storedefault .navBar .others').css('height', $(window).height());
                var isShow = true;
                $(document).click(function () {
                    $('.storedefault .navBar .others').hide();
                    isShow = true;
                });
                $('.storedefault .navBar ul li:last-child').click(function () {
                    if (isShow) {
                        $('.storedefault .navBar .others').show();
                        isShow = false;
                    } else {
                        $('.storedefault .navBar .others').hide();
                        isShow = true
                    }
                    event.stopPropagation();
                });
                $('.storedefault .navBar .others ol').click(function () {
                    event.stopPropagation();
                });
            }
            showlist();


            //第二行文字溢出省略号，貌似没有效果，屏蔽
            //            var paragraph = document.getElementsByClassName('dayfavorable_title');
            //            for(var i=0;i<paragraph.length;i++){
            //                $clamp(paragraph[i], {clamp: 2});
            //            }

            //优惠券轮播
            if ($('.adverTxt').length != 0) {
                var n = 1;
                var interval;
                $('.adverTxt .adverTxt_box:nth-child(1)').css('z-index', 1);
                function rungrade() {
                    $('.adverTxt .adverTxt_box:nth-child(' + n + ')').animate({ 'top': '-40px' }).css({ 'top': 0 });
                    if ($('.adverTxt .adverTxt_box').length == n) {
                        n = 0;
                    }
                    n++;
                    $('.adverTxt .adverTxt_box:nth-child(' + n + ')').css({ 'top': '40px', 'z-index': n }).animate({ 'top': 0 });

                }
                if ($('.adverTxt .adverTxt_box').length != 1) {
                    interval = setInterval(rungrade, 2000);
                }
            }
        });

    </script>
    
    
<script src="/wap/lib/common/loaderHandler.js" type="text/javascript"></script>
<script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
<script src="/Wap/lib/jquery_lazyload/jquery.lazyload.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function initializePage() {
        var handler = $('.storeBanner').loaderHandler();
        handler.initialize({
            command: 'Pub.LoadOrderForApple',
            parameter: { PageSize: 6 },
            afterHandleResult: function (result, totalCount, container) {
            //苹果书屋
//                $('#apple_g').text(result.PayCount.substr(5, 1));
//                $('#apple_s').text(result.PayCount.substr(4, 1));
//                $('#apple_b').text(result.PayCount.substr(3, 1));
//                $('#apple_q').text(result.PayCount.substr(2, 1));
//                $('#apple_w').text(result.PayCount.substr(1, 1));
//                $('#apple_sw').text(result.PayCount.substr(0, 1));

                //处理热卖

//                var itemTemp = '<li>' +
//                        '<a href="{Url}" data-ajax="false"><img src="{PhotoUrl}" /></a>' +
//                        '<p class="dayfavorable_title">{Title}</p>' +
//                        '<div><span><em>¥</em>{Param2}</span><i>已售<em>{SellCount}</em></i></div>' +
//                        '</li>';

//                $(result.Data).each(function () {
//                    this.PhotoUrl = firstFilePath(this.PhotoUrl);
//                    $('.hotproductlist').append(itemTemp.format(this));
//                });

                if (result.TJData[0]) {
                    $("#tj_1_a").attr("href", result.TJData[0].Url);
                    $("#tj_1_i").attr("src", firstFilePath(result.TJData[0].PhotoUrl));
                    $("#tj_1_s").html(result.TJData[0].SellCount);
                    $("#tj_1_t").html(result.TJData[0].Title);
                    $("#tj_1_d").html(result.TJData[0].Description);
                }

                if (result.TJData[1]) {
                    $("#tj_2_a").attr("href", result.TJData[1].Url);
                    $("#tj_2_i").attr("src", firstFilePath(result.TJData[1].PhotoUrl));
                    $("#tj_2_s").html(result.TJData[1].SellCount);
                    $("#tj_2_t").html(result.TJData[1].Title);
                    $("#tj_2_d").html(result.TJData[1].Description);
                }

                if (result.TJData[2]) {
                    $("#tj_3_a").attr("href", result.TJData[2].Url);
                    $("#tj_3_i").attr("src", firstFilePath(result.TJData[2].PhotoUrl));
                    $("#tj_3_s").html(result.TJData[2].SellCount);
                    $("#tj_3_t").html(result.TJData[2].Title);
                    $("#tj_3_d").html(result.TJData[2].Description);
                }
            }
        });
        handler.load();
        queryData();
    }
    $(function () {
        initializePage();

//        $("#wrapper ul").width($("#wrapper ul li").length * $("#wrapper ul li").width() + 12 * $("#wrapper ul li").length);
//        var Scroll = new iScroll('wrapper', {
//            fadeScrollbars: false,
//            scrollY: false
//        });

        //        $('div.countdown').countdown('2016/05/20 23:59:59').on('update.countdown', function (event) {
        //            var $this = $(this).html(event.strftime(''
        //                                 + '<span style="color:#ed4e2a; font-size:14px;margin:0 2px">%D</span>天'
        //                                 + '<span style="color:#ed4e2a; font-size:14px;margin:0 2px">%H</span>时'
        //                                 + '<span style="color:#ed4e2a; font-size:14px;margin:0 2px">%M</span>分'
        //                                 + '<span style="color:#ed4e2a; font-size:14px;margin:0 2px">%S</span>秒'));
        //        });
    });
    
    function queryData() {
        var handler = $('.hotproductlist').listviewHandler();
        
        var itemTemp = '<li onclick="location.href=\'/Wap/Shop/ProductDetail.aspx?no={ProductNo}\'">' +
        '<img class="pimgc" data-original="{ThumbnailImg}" src="images/loading.gif"/>' +
        '<p class="dayfavorable_title">{ProductName}</p>' +
        '<div><span><em>¥</em>{SalePrice}</span><del style="color: rgb(153, 153, 153); margin-left: 5px; font-size: 12px;float: left;">{MarketPrice}</del></div>' + //<i>已售<em>{SellCount}</em></i>
        '</li>';

        handler.initialize({
            loaderBtn: $('#btnMore'), //加载数据按钮（点击加载下一页）
            emptyHtml: '无记录', //无记录时显示此html
            itemTemplate: itemTemp, //项模板
            pageIndex: 1, //页码（从1起算）
            pageSize: 9, //页大小
            totalCount: 999, //总记录数
            itemHandler: function (data, itemTemplate, container) {//数据各项处理
                data.ThumbnailImg = firstThumbnail(data.ThumbnailImg);
                if (data.Storage > 0) {
                    return itemTemplate.format(data);
                  }
              
            },
             //之前
             beforeHandleResult: function (result, totalCount, container) {
               
              },
             afterHandleResult: function (result, totalCount, container) {
//               //  图片延迟加载
                  $('img.pimgc').lazyload({
                      event: 'scrollstop'
                  });
               },
            command: 'Pub.LoadProductList',
            parameter: {CategoryId: '<%=Request["categoryId"] %>',TagId: '<%=Request["tag"] %>' }
        });
        handler.nextPage();
    }

    $(function () {
        $(window).scroll(function () {
            //当内容滚动到底部时加载新的内容

            if ($(this).scrollTop() + $(window).height() + 20 >= $(document).height() && $(this).scrollTop() > 20) {
                //当前要加载的页码
                $('#btnMore').click();
            }
        });
    });

</script>
</asp:Content>
